package com.wl.application.feign.api;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.wl.application.feign.impl.SentinelServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author wl
 * @version 1.0
 * @date 2022/7/28
 * @description:
 */
@FeignClient(value = "server-2",path = "/sentinel2"
        ,fallback = SentinelServiceImpl.class)
@Service
public interface SentinelService {
    @GetMapping("/test1")
    public String serverText1();
    @GetMapping("/test2")
    public String serverText2();
    @GetMapping("/test3")
    public String serverText3(@RequestParam Integer a);
    @GetMapping("/test4")
    @SentinelResource("myTest4")
    public String serverText4(@RequestParam Integer a,@RequestParam Integer b);
    @GetMapping("/test5")
    public String serverText5();
}
